<template>
  <view class="confirm-box">
    <view class="confirm-info">
      <view class="confirm-head">是否删除此待办？</view>
      <view class="confirm-body">
        <span @click="closeConfirm">取消</span>
        <span @click="deleteTask">删除</span>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {},
  components: {},
  data() {
    return {};
  },
  computed: {},
  watch: {},
  methods: {
    closeConfirm() {
      this.$emit("closeConfirm");
    },
    deleteTask() {
      this.$emit("deleteTask");
    },
  },
  created() {},
  mounted() {},
  beforeDestroy() {},
};
</script>

<style lang="scss">
// 是否确认
.confirm-box {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 10;

  .confirm-info {
    position: absolute;
    left: 0;
    bottom: 30rpx;
    width: 92%;
    margin: 0 4%;
    padding: 30rpx;
    background-color: #fff;
    border-radius: 8rpx;

    .confirm-head {
      color: #333;
      font-size: 28rpx;
      text-align: center;
    }

    .confirm-body {
      position: relative;
      margin-top: 40rpx;

      &::before {
        content: "";
        position: absolute;
        top: 2rpx;
        left: 50%;
        width: 2rpx;
        height: 48rpx;
        background-color: #cccccc;
        transform: translateX(-50%);
      }

      & span {
        display: inline-block;
        width: 50%;
        height: 52rpx;
        line-height: 52rpx;
        text-align: center;
        font-size: 28rpx;
        color: #999999;
      }

      & span:last-child {
        color: #ff6262;
      }
    }
  }
}
</style>
